package com.example.demo.alex.service.serviceImpl;

import com.example.demo.alex.mapper.PersonMapper;
import com.example.demo.alex.model.Person;
import com.example.demo.alex.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName PersonServiceImpl
 * @Description TODO
 * @Author zjg
 * @Date 2018/12/2515:41
 * @Version 2.0
 */

@Service("personService")
public class PersonServiceImpl implements PersonService {

    @Autowired
    PersonMapper personMapper;
    @Override
    public List<Person> findAllUser() {
        return personMapper.findAllUser();
    }

    @Override
    public Person findUserByid(Long id) {
        return personMapper.findUserByid(id);
    }

    @Override
    public Person findUserByUserName(String userName) {

        return personMapper.findUserByUserName(userName);
    }
}
